<?php
// +----------------------------------------------------------------------
// | EtrolPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Author: LJQ <245369209@qq.com> 
// +----------------------------------------------------------------------

namespace app\basic\model;

/**
 * 危化工艺
 */
class Craft extends Dangersource{

	protected $sourceType = 3;
	protected $auto = ['sourceType'];

	public function getTypeList(){
		$hazardType = db('basicinfo')->where('sysCode',18)->column('subsystemName','subsystemNo');
		return $hazardType;
	}
	
	public function getTypeIdAttr($value,$data){
		$typeList = $this->getTypeList();
		if($data['typeId']){
			return $typeList[$data['typeId']];
		}
		return null;
	}
}